//配置express的中间件，将app传入加入路由控制系统
const express = require("express");
const session = require("express-session");
const bodyParser = require("body-parser");
var app = express();
app.use(express.static("./public")); //静态网页文件
app.use(session({ secret: "abc" })); //敏感信息的加密
app.use(bodyParser.json());//头要加 Content-Type;application/json
app.use(bodyParser.urlencoded());




require("../routes/user.server.route")(app);
require("../routes/merchant.server.route")(app);
require("../routes/food.server.route")(app);
require("../routes/order.server.route")(app);
module.exports = app;
